<!-- ================= 丰富型TAB ================= -->
<!-- TAB -->
<script>
function switchTab(status,theme,once){
    var img = "<img src='" + theme + "/images/bigloading.gif'/>";
    var old_html = $('#askList').html();
    $('#askList'+once).html(img);
    $.post('<php>echo SITE_URL;</php>' + "/index.php?app=ask&mod=Index&act=showList", {
        status: status
    }, function(result){
        if (result) {
            var jsonDate = eval('(' + result + ')');
            var html = "";
            for (var one in jsonDate) {
                if (typeof(jsonDate[one].askId) == 'undefined') {
                    continue;
                }
                html += replaceHtml(jsonDate[one]);
            }
            $('#askList'+once).html(html);
        }
        else {
            $('#askList+'+once).html(old_html);
        }
        
    })
    
}

function replaceHtml(jsonObject){
    var innerHtml = "";
    if (jsonObject.type == 1) {
        innerHtml = '<span class="ico_money">' + jsonObject.score + '\
                 </span>';
    }
    
    var url = jsonObject.url;
    var html = '<li>\
               <span class="anwer2">' + jsonObject.answerCount + '</span>\
               <span class="ba f14">' +
    innerHtml +
    '<a  target="_blank" href="' +
    url +
    '">' +
    jsonObject.title +
    '</a>\
															<a class="cl_l" href="' +
    jsonObject.categoryUrl +
    '">[ ' +
    jsonObject.category.title +
    ' ]</a>\
               </span>\
															<span class="img_w"><img src=' +
    '<php>echo "../Public";</php>' +
    '/images/status_' +
    jsonObject.status +
    '.gif  class="alM"/></span>\
             </li>'
    return html;
}
</script>
<div class="tab" id="{$tabId}">
	<ul>
		<volist name="data" id="vo">
		<li><span><a href="#{$tabId}-{$key}" ><php>echo $vo->title;</php></a></span> </li>
		</volist>
	</ul>
</div>
<!-- 详情 -->
<div class="diy_tab_box">
		<volist name="data" id="vo">
			 <div id="{$tabId}-{$key}">
				<php>echo $vo->comment;</php>
	    	</div>
		</volist>
</div>

<script>
	$('#{$tabId}').tabs();
</script>